GBML manual / Core

game_paused

True while the game is paused (see game_pause).

Syntax

game_paused() -> bool

Returns

bool

Description

True while the game is paused (see game_pause). Since Draw/Draw GUI keep running even while paused, this is how a pause-menu object's own Draw GUI event tells whether it should currently be showing itself at all.

Example

if (game_paused()) {
    draw_text(4, 4, "PAUSED");
}

Shows a "PAUSED" label only while the game actually is paused - the label's own Draw GUI event keeps running either way, so this check is what makes it appear and disappear with the paused state.

See also: game_pause